package router

import (
	"github.com/labstack/echo/v4"
	"net/http"
	"turingApi/control"
)

// authenticatedRouter 登录访问
func authenticatedRouter(auth *echo.Group) {
	auth.GET("/ws/v2", control.WsHandlerV2)
	auth.GET("/ws/v2/:from/:to", control.WsHandlerV2)
	auth.GET("/sign", control.SignHandler)
	auth.Any("/upload", control.UploadHandler)
	auth.Any("/editProfile", control.EditProfileHandler)
	auth.Any("/notifyShare", control.NotifyShareHandler)
	auth.Any("/validate", control.ValidateToken)
	auth.Any("/getShareRecords", control.GetShareRecordsHandler)

	auth.Any("/videoReward", control.VideoRewardHandler)
	auth.Any("/videoLog", control.VideoLogHandler)
	auth.GET("/test", func(c echo.Context) error {
		return c.JSON(http.StatusOK, echo.Map{"code": 200})
	})
}
